﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tulde.Core
{
    /// <summary>
    /// An interface defining method to save and retrieve objects.
    /// </summary>
    public interface IStorageProvider
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="path"></param>
        /// <param name="data"></param>
        void Save(string path, string data);
        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="path"></param>
        /// <param name="data"></param>
        void Save<T>(string path, T data);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="type"></param>
        /// <param name="path"></param>
        void Save(Type type,object data, string path);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        string Read(string path);
    
        T Read<T>(string path);
        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="type"></param>
        /// <param name="path"></param>
        /// <returns></returns>
        T Read<T>(Type type, string path);
        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="path"></param>
        void Load<T>(string path);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="path"></param>
        void Delete(string path);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        bool Exists(string path);

        string[] ListAll();

    }
}
